package com.lvmama.rhino.service.impl;

import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.lvmama.rhino.mapper.SuperfreetravelMapper;
import com.lvmama.rhino.pojo.superfreetravel.PageView;
import com.lvmama.rhino.pojo.superfreetravel.PageViewVo;
import com.lvmama.rhino.pojo.superfreetravel.SearchListVo;
import com.lvmama.rhino.pojo.superfreetravel.SuperfreeFlowstatistic;
import com.lvmama.rhino.service.SuperfreetravelService;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service("SuperfreetravelService")
public class SuperfreetravelServiceImpl implements SuperfreetravelService {


    @Autowired
    private SuperfreetravelMapper superfreetravelMapper;

    @Override
    public PageInfo<SuperfreeFlowstatistic> searchList(SearchListVo searchListVo){
        PageHelper.startPage(searchListVo.getCurrentPage(), searchListVo.getPageSize());
        PageInfo<SuperfreeFlowstatistic> result= new PageInfo<>(superfreetravelMapper.searchList(searchListVo));
        return result;
    }

    @Override
    public PageInfo<PageView> getPageViewList(PageViewVo pageViewVo){
        PageHelper.startPage(pageViewVo.getCurrentPage(), pageViewVo.getPageSize());
        PageInfo<PageView> result= new PageInfo<>(superfreetravelMapper.getPageViewList(pageViewVo));
        return result;
    }
}
